/* 
 * File:   Dictionary.h
 * Author: joseluis
 *
 * Created on 28 de diciembre de 2012, 13:13
 */

/* 
 * File:   Dictionary.h
 * Author: eduardo
 *
 * Created on 5 de noviembre de 2012, 20:45
 */

#ifndef DICTIONARY_H
#define	DICTIONARY_H

#include <map>
#include <string>
using namespace std;

class Dictionary {
public:
    Dictionary();
    ~Dictionary();

    int insertTerm(string entry, int post);
    int getValue(const string& key);
    int getSize();
    
    void clear();

    map<string, int>::iterator getBegin() {
        return _dict.begin();
    }

    map<string, int>::iterator getEnd() {
        return _dict.end();
    }

private:
    map<string, int> _dict;

    inline bool belongTo(const string& key);
};

#endif	/* DICTIONARY_H */

